﻿{% extends "mweb/base.html" %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="weui-msg">
    <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
    <div class="weui-msg__text-area">
        <h2 class="weui-msg__title"> 微信充值 </h2>
        <p class="weui-msg__desc"> 充值￥{{ rmb }} </p>
    </div>
    <div class="weui-msg__opr-area">
{#        <p class="weui-btn-area">#}
{#            <a href="{% url 'mweb:pay_list' uid 'wx' %}" class="weui-btn weui-btn_block weui-btn_primary"> 已完成支付 </a>#}
{#            <a href="{% url 'mweb:pay_list' uid 'wx' %}" class="weui-btn weui-btn_block weui-btn_default">支付遇到问题，重新支付</a>#}
{#        </p>#}
    </div>
    <div class="weui-msg__extra-area">
        <div class="weui-footer">
            <p class="weui-footer__links">
                <div class="weui-footer__link">HiBao</div>
            </p>
            <p class="weui-footer__text">Copyright &copy; 2019 yyzb.com</p>
        </div>
    </div>
</div>

{% endblock content %}

<!-- SCRIPT
  =====================================================================-->


{% block extra_js %}
<script>

$(function() {
    let url = "{% url 'mweb:api_pay' %}";
    let data = {
        'uid': {{ uid }},
        'rmb': {{ rmb }},
        'wap_name': 'haibao',
    };

    new my_ajax(url, data, '', '', (data, message) => {
        window.location = data['mweb_url'];
    });
});

</script>
{% endblock extra_js %}
